<?php

// $Id$

require_once(TANGRA_MAIN_DIR.'form/fields/text/form_field_text_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/select/form_field_select_semidynamic_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/guardable_form_view.class.php');


class Menu_Form_View extends Guardable_Form_View {
	function __construct(Form &$form) {
		parent::__construct($form);

		$f_name = $form->get_field('name');
		$f_name_view = new Form_Field_Text_View($form->get_name().'_'.$f_name->get_name(), $f_name);
		$this->add_field_view('name', $f_name_view);

		$f_hid = $form->get_field('hid');
		$f_hid_view = new Form_Field_Text_View($form->get_name().'_'.$f_hid->get_name(), $f_hid);
		$this->add_field_view('hid', $f_hid_view);

		$f_type = $form->get_field('type');
		$f_type_view = new Form_Field_Select_Semidynamic_View($form->get_name().'_'.$f_type->get_name(), $f_type);
		$this->add_field_view('type', $f_type_view);

		$f_params = $form->get_field('params');
		$f_params_view = new Form_Field_Text_View($form->get_name().'_'.$f_params->get_name(), $f_params);
		$this->add_field_view('params', $f_params_view);
	}
}